package com.gdou.teaching.mapper;

import com.gdou.teaching.dataobject.Clazz;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author MelancholyCat
 * @date Created in 21:35 2019-07-27
 * @description ClazzMapper Interface
 */
@Mapper
@Repository
public interface ClazzMapper {
//    增
    int addClazz(Clazz clazz);
//    逻辑删除
    boolean deleteClazzByClazzId(Integer clazzId);
//    改
    boolean updateClazz(Clazz clazz);
//    根据班级名称查找班级
    List<Clazz> selectClazzByClassName(@Param("className")String className, @Param("status")int status);
//    根据班级id查找
    Clazz selectClazzByClassId(@Param("classId") int clazzId, @Param("status")int status);
//    班级分页
    List<Clazz> selectClazzByPage(@Param("offset")int offset, @Param("limit")int limit, @Param("status")int status);


    List<Clazz> selectClazzList(@Param("status")int status);
}
